<template>
    <div>
        <div class="block">
            <el-carousel height="150px">
                <el-carousel-item>
                    <img src="../../assets/1.jpg" class="carousel_image_type">
                </el-carousel-item>
                <el-carousel-item>
                    <img src="../../assets/4.jpg" class="carousel_image_type">
                </el-carousel-item>
                <el-carousel-item>
                    <img src="../../assets/logo.png" class="carousel_image_type">
                </el-carousel-item>
            </el-carousel>
        </div>
        <div style="margin-top: 20px">
            <el-row  type="flex" align="middle" justify="space-between">
                <el-col :span="7" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">
                    <el-card :body-style="{ padding: '0px' }">
                        <img :src="car_img" class="image" alt="www">
                        <div style="padding: 14px;">
                            <span>一路平安的车险</span>
                            <div class="bottom clearfix">
                                <time class="time">买保险就来找我</time>
                                <el-button type="text" class="button" @click="toCarComponent">买车险</el-button>
                            </div>
                        </div>
                    </el-card>
                </el-col>
                <el-col :span="7" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">
                    <el-card :body-style="{ padding: '0px' }">
                        <img src="../../assets/yiwai.jpg" class="image">
                        <div style="padding: 14px;">
                            <span>救命的意外险</span>
                            <div class="bottom clearfix">
                                <time class="time">买保险就来找我</time>
                                <el-button type="text" class="button" @click="toAccidentComponent">买人身意外险</el-button>
                            </div>
                        </div>
                    </el-card>
                </el-col>
                <el-col :span="7" v-for="(o, index) in 1" :key="o" :offset="index > 0 ? 2 : 0">
                    <el-card :body-style="{ padding: '0px' }">
                        <img src="../../assets/qidai.jpg" class="image">
                        <div style="padding: 14px;">
                            <span>其他险种敬请期待</span>
                            <div class="bottom clearfix">
                                <time class="time">买保险就来找我</time>
                            </div>
                        </div>
                    </el-card>
                </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
    name: "index",
    data() {
        return {
            car_img:"http://qzq53lezl.hn-bkt.clouddn.com/car1.png",
            isLogin:false
        }
    },
    methods:{
        isLogin:function (){

        },
        toLoginComponent:function () {
            this.$router.push("/login")
        }
        ,toCarComponent:function () {
            this.$router.push("/home/carinsurance")
        }
        ,toAccidentComponent:function () {
            this.$router.push("/home/accidentinsurance")
        }
    }
}
</script>

<style scoped>
.el-carousel__item h3 {
    color: #475669;
    font-size: 14px;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
}

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n+1) {
    background-color: #d3dce6;
}

.time {
    font-size: 13px;
    color: #999;
}

.bottom {
    margin-top: 13px;
    line-height: 12px;
}

.button {
    padding: 0;
    float: right;
}

.image {
    width: 100%;
    display: block;
}

.clearfix:before,
.clearfix:after {
    display: table;
    content: "";
}

.clearfix:after {
    clear: both
}
</style>
